support for context middleware