move keygroup's import related code into an importer