use code from cli_helper