components middleware