update shortes path calulation