moved CHILD_SA selection out of attribute loop