added deallocation of expo_avgs
added trimean convenience function