tree constructure