forLoop working