change for loop style