rewrite new function for output newick formatted tree strings