changed 'with' blocks to use <- operator and added List predicateType