Implemented a much faster random number generation scheme