added cli implementation