added more validation to submit button