use usleep for sleeping