for loop improved (it's working like C for lop)