added: middleware can add as flag ('#middleware')