Change function of delete