fixing class inheritance