[USETUP] Use for-loops; simplify the code.