cli.rb rearranged a little bit