average functions running