Adapted to the new JSON format (buggy)