implementing trimMonoid