updated to support multiple graph node types