adds new middleware