changed hierarchy of classes