trying to convert last sample to use CLI