shouldn't this be `func(MetricMap) error` and then return the error on L29?