better inheritance hierarchy walk