use given randomnumber