implement the middleware stack
fix the spec desc