added batfish_query_predicate()