Optimize sum for each node
rename
bug fix
renaming