i like the middleware idea, but couldn't get it to work. It never fired. It's possible that I'm just attaching the middleware to the wrong call.