Improvements: now calcs avg, max, min etc. WIP