split the graph reading and parsing into another source file