changed dtor to virtual dtor
added virtual dtor