"random" api fixed