note that chunks might have different lengths.