general search problem