added an error check for inputs as well as a clean command to clean up the console