heirarchical class design