refactoring for parallel load