add chain function on Monoid