implemented command line option parsing