Added check to make sure there is user input