Added distance algorithm to dev interface.