rand comparison