add class and instances for Monoid