input validation upgrade