fix get_ms_tree for encapsulatation
move to this repo for good