implemented a CLI, fixes #5