Nice show case for middleware usage! I'll add a public API for middleware handling