How religion influences social morality