updated computeMetrics.java