needed a better mechanism to determine ancestor groups as empty(array) was not sufficient.