adding deletion of pointers to the destructor