modified for Monacoin use.