Changed array to object