middlewares kinda working