attempt of Monoid[Cost]