adjust pointer use and add destructor