Improved RandomUtil