switching to saving/loading chains in json