implemented the predicate merging rule