importer logic extracted