remove trailing comma in array
simplify CubingAverage by using ComparableSolve module