change array of array to hash

change array of array to hash and lose collect call