adding a local _dt variable to store previous time step size.