Add search() function