improved searchbox functionality