try not to name local variables after commonly used functions (such as those in nucname).  nuc, nucid, zam, etc would be good substitutes here.