The relationship between waking and dreaming