porting pmSearch to use write out additional predicates