add some comments and tests
still refactoring mersenne twister