need better PRNG too
Rewrite with more c++