main: option parsing