wip add calc of link cost