adding logic to cli