add function call to check connection on links