change destruct to virtual