Factors leading to major shifts in religious beliefs