adding average calculations to teams.show controller.