Added validations on user input