removed thread.sleep() bad idea