Working out the looping for the grandchildren