added check on size of nrOfPossibleNextHops