more refactoring of data-import phase-2