How to implement a multiple tree?

@Nobbz I have updated the code~