change sleep to usleep just for consistence of code