updated chapter 5 files, fixed array bugs, and type dec problems again