implement class inheritance