refactor import generator