command line interface
refactoring