added timestep control