working on the moving average graph