split user input validation function into new class named UserInputValidation.java