added average method