the idea had come to him when he was sitting in a coffee shop during the second year of his phd pondering a difficult question which was proving to be a stumbling block in his research : if the mind is simply a function of the brain , then how does one account for near death experiences and out of body experiences ?