edits to reroot -- not done