reading graph from index