merged promise.js