completed CLI version