method team batting average working