The origin of religions