Bugs fixed, ready for defining new class for the metric