generisized the main cli blocks