modified the way deleted items are processed