add optparse and takes commandline args
Merge branch 'work'