add more examples and update README.md to show howto use loops