improve time step selection logic