use logger for debug print
return number of iterations