clean up newick tree in correct order