Implement delete function(case 1, 2)