Dreaming and adaptation: the perspective of control- mastery theory