add illegal answer check and remove live in predicate