implemented the MetricManager and the Metric class