use optparse for command line option parsing