remove spaces from the for loop