remove thread.sleep to fix performance issue