i have found 2 mentions of srand in your reference neither really helped me.
i know i have found the problem but i don't understand why it is happening. can you explain to me why it is happening?