add checking exists and delete