update code in chapter 1 arrays and strings