repalce cmd 'char' to enum