Implemet delete function(case 3)