Added method to add and delete if exists.