changed graph nodes to use builder pattern