Metrics refactored step 3 final