validation for user input added