make destructors of derived classes virtual