search box made more flexible