added a more flexible way to spec the search space