make the for loop more ECMA5'y