improve env command
code refactor
code refactor
code refactor