getAverage works, need change return type