reading in graph