calculate avg and peak values every time the session is loaded