fix to the randomizing