onto distance impl