implementation of issue #17 transform metric