adding to json.parse check to clear errors that are occuring in console