search bar changed and new function