Reverted moving distance algorithm into data value.