Adapted to the new JSON format