template and its values deletion
Adding delete function