changes nearly finished for commutative monoid