remove sleep function

It causes problems