use optparse and actions