add resolve/reject to Deferred