modify debug function of derived class