add some option parsing to the reply script