remove thread.sleep