allow custom middleware