detailed program flow - Search