messing with middleware