example of an algorithm - Search