Finalized metric DMAX implementation