migrating from JQUeryPromise to ES6 Promise