added node and graph classes