detect root in select many