fixed tests and code for metricValue.