revert back to use monoid