for loop better than while loop