added average progress function