The Function of the Dream How the Brain Creates the Mind