         @accumulator.batched = !@accumulator.batched
         @setStateFromAccumulator()
 
+    toggleAutoSave: ->
+        @setState({
+            autoSave: !@state.autoSave
+        })
+
     reset: ->
         @accumulator.reset()
         @setStateFromAccumulator()


    getInitialState: ->
        return {
            accumulator: new Accumulator()
            value: 0
            chartData: {

                <button className="pure-button" onClick={@addOnePerSecond}>Add 1/sec</button>{' '}
                <button className="pure-button" onClick={@addOnePerSecondPerSecond}>Add 1/sec<sup>2</sup></button>{' '}
                <button className="pure-button" onClick={@reset}>Reset</button>{' '}
                <button className="pure-button" onClick={@save}>Save</button>{' '}
                <label className="pure-checkbox"><input type="checkbox" onChange={@toggleAutoSave} checked={@state.autoSave} />auto-save</label> 
            </p>
            <p>
                <label className="pure-checkbox"><input type="checkbox" onChange={@toggleDiscrete} checked={@state.accumulator.discrete} /> discrete</label>{' '}
