refactor pop_chilren_attr, remove_children -> swap args