task middleware uses deferral