Replace q with deferred