updated snippets to use OptionParser