refactor + search bar