class inheritance finished