adding destructor to the client