added average output