changed Metric class into an interface