add json and ajax
added json file and added switch statement