fixed deprecation warning on `-c`. added example with for loop.