added code for search