add search and add event listeners