refactored dataimport to be more simple