added variable time step