added safe deletes