Removed thread.sleep