Added distance measure