validations done for proper input