ES6-promise resolution