export link distance with function