solving the x overflow

put something mysterous to global var
using epoch time to initialize rng (srand)