changed to array of json objects