refactorings in load()