add checks for delete