fixed for-loop example