Added method for verifying user input