base and derived class repository