improve and simplify looping structures

There, I just removed it.