use following fact at the artificial timestep time[-1] voltage[-1] === voltage[0] to shortcut the expressions