fixed predicate builder to use generic expressions