writing host tree