basic tree writing functionality
test data added