remove unnecessary sleeping (busy waiting)