complted the function of base class