moved cli logic into class CommandLineInterface