adds begin of running-avg script
finish running-avg script