add function to statsUtils.js to calc total mi over time