plus building tree for trajectories