for loop instead of forEach for ie<9