chain rule to chair-distance