fix sum bug, but did not complete