add avg method into MathUtils