added average var