added destructor to db class.