Is it possible to have a function that creates its own Deferred object, and when the function has Deferred.resolved proceed with the Deferred.then method? Or do I have to create the Deferred object outside the function, pass it in then return the resolved object?Is it possible to have a function that creates