fill in some methods in node and edge classes