completed input validation