logarithmic number of steps