fixed and readded route querying
added role predicates to flow queries