general method to create infinite search spaces