move predicates into tools