Added timestep calculation