delete middleware