add a test for random search