clean up contiguous sum