remove sleep to outside