fixed input validation, submission