extended monoid tutorial