tidyed up makeTree