sleep master routine