yes, it was something like that

I just seed the time at the beginning of the code, and get the random number later with qrand when necessary.

thanks!