some renaming and refactoring for graph loading