Changed array to hash