chooseNewRoot and organizeBranches -> from Enqueue to separate functions