updated addChildren, tried to fix algorithm
FIXED ALL THE THINGS!!! It works!