added basic getopt processing