added iteration count and some comments to example program