getAverage

making average method work