Small example from homework. Refactor into search engine?