implement sleep functions