change function name
add alignment output for sum
fix: sum should be "Err" if error occured during calculation