write for loop