changed array to object