enhanced base class: created hierarchy for objects in train\test and moved train\test to base class