style fix

put var x in for loop