fixed sum function