better inheritance hierarchy