read graph