changed to retrieve data from json