support for middleware or handler wrappers added (see README for example)