defined average calculation

still no functionality!