Removed System.sleep(originally for testing)