Use each_slice, not slice
Increment curr_chunk