exposed middleware