2.1 refactor match predicate extraction