updated example code to including saving-freq option