make import/export impl more functional oriented