updated searh function w/ comments