changes in virtual functions, to record the events ... set friend class, so the derived class could access private members.