tried reduce, gives weird syntax error
made reduce work, lengthens time it works for
Merge pull request #1 from hughrawlinson/optimizingRMS

Optimizing rms