Revert "change random funcion"

This reverts commit 7e5fc755875e0235b0468887c55ba1558d457e50.