es6 refactor