update array to hash in ch6 tests