how would you then use/integrate the middleware?