add example to help clarify the algorithm