convert from $.Deferred.promise() to new Promise()