modified for cmdcoin