finished the first part of the sleep script