deleting a class when no children left in it
walk around the defect of duplicating class_id while creating