New function deletecase

New function deletecase