calculating simple average