Random function made more 'fair'.