remove rand comparison in test