split delete method into two method (item and class)