debug for newick tree format string
tidy up code