the second one seems better, are you sure seq will keeps outside the forloop ?