add correct distance constraint