created graph from input file