demo for class inheritance