added helpers for writing cli programs