implemented trim monoid
implementing a concatenate function to using different Monoids