added cli mode