chap1 array-version