Separated the classes and worked on buildgraph