Role of dreaming in the brain