finish construct tree from prev and in