save final tree