localize sum in asserts