private static double average(long total, long count) {
    if (count == 0) {
      return 0;
    }
    double avg = (double)total / count;

    return (double)(Math.round(avg * 100)) / 100;
  }
private static double average(long total, long count)