Better approach to withDeferred()