Working on functions to iteratively update genealogy