change to use optparse