Improve rand