refactor command line