changed controller to read data from json file