updating to match reply middleware's new functionality