merging
merging
bug fix in EntropyWithCosts