added cmdline options for examples
added cmdline opts to examples