Implemented k2p distance