added random10 function