change destructor to protected