adding soluction for saving off the range in json format