Working on general case for complex predicates