added factor quadratic rule
debugged removal of child nodes