public function nextMiddleware(Request $req, Response $res)
    {
        $middleware = $this->middleware->current();

        // base case - no middleware left
        if (!$middleware) {
            return $res;
        }

        // otherwise, call next middleware
        $this->middleware->next();

        return $middleware($req, $res, [$this, 'nextMiddleware']);
    }