changed random functions to use SFMT and added re-entrent random functions