improve cli script