Feature/middleware