added variable to fix white spaces in the for loop