Removing print statement in Graph