fix costs (Monoid and use Bag)