Updated: Use better random numbers