back to linear for building trees