segmented scan prototype runs but produces wrong values