feat: compile es6
refactor(index): use es6 features