making searches seperate functions