add prefix_sum and initial tests