refac runCmd
typify main