refactor import method