simplify Contract.filter