implemented search based on config