implemented destructor