mostly hacking related to MassCounts type based on multiset package