made destructor virtual