exit if not valid