added functionality to delete before adding a new entry with same name