made it deterministic by adding my own pseudorandom number generator  implementation