updated the json objects to be more flexible
updated the js file to work with the new json object structure