changes to sum_odds and level_of_maximum

changed these two functions to make them implementation agnostic