added randomized test