implement CLI