search and switch views