descendant source selection, code cleaning