change array to hash