added a bunch of JSON parsing functions