implemented link calculation