added code to get JSON