raw import refactoring