different distances implemented