finished porting code, not sure if good adaption for fedoracoin...dont sue me if this breaks aka you lose coins