add utilities and directive for invalid input