monoid homework