Updated the random sample code that is random