update input validation