graph class can create nodes and draw nodes and edges