add example for class inheritance