reading graph from file implemented