option parsing and functional unit testing