example of algorithm - Search