moved random search from tests to sources