add search function, need to handle the focus stuff