All code for timer added but commented out working on moving average.