refactor and update search options