another version of collection array to hash convertion