implemented a CLI interface