very basic support for global middleware