middleware redone