Tweaked for PotCoin