Added a randomized test