returns correct distance