Added client side average calcuations