adapted for Cachecoin *fixed