updating middleware with corrent naming convention