fixed child, parent hierarchy. changed to RTTI in output