this method worked good, i did not realize to set the global twice.
the reason to set the counter to 0 in the end is so that the function
is usable more than 10 times (or whatever limit it is)
thanks for pointing out that it was in the wrong row though xD
probably would not have figuered that one out so fast
bless