added missing imports for History.as_json