writing option parsing code