changing one api call to cli call