additions to k_sum helper