updated main and index file to correct getjson bug