group cleanup semigroup monoid