added filtering and interspersing to the folding homomorphism laws