refactor JSON parsing