Tightening up search to be more flexible