converting a simple tree to a tree that satisfies children sum property