First version with multi-tree support