refactor data import util