modified the live demo to look at the most recent moving avg