preliminary mersenne twister implementation