separate cli and class