adding node and edge classes