Initial search function for program