added a Node class and improved DistanceVector class