refactor code of RegessionTree, use broadcast variable to fix bugs