PPtree_split copy of PPtree function