Code cleanup: variable is not used outside the for-loop