move build_tree part out of class FLIPACK2D