recursively get children in groups