moved delete operation further down