added new classs Node and Edge.