now with middleware kinda sorta :sparkles: