refactor export.index