fixed for loop, no C style stuff needed