removing thread.sleep 'debug mode'