modified for spaincoin