test virtual class and virtual function