fixed JSON parsing to reflect the new format