fixed sleep to act as a void function