use new middleware