change from array to object