refactor command line options