A new state penalty that is calculated as a percentage of overall fines imposed is penal in nature and may not be imposed retroactively. The defendant here asked the appellate court to strike the state surcharge imposed under Penal Code section 1465.7, as well as the state court facilities construction penalty under Government Code section 70732, on the grounds that those penalties were enacted after the commission of his offense, and imposing them in his case violated the ex post facto clause. The Attorney General conceded the issue as to the Penal Code section 1465.7 surcharge, but argued that the Government Code penalty was not punitive but was rather in the nature of a user fee. The appellate court disagreed, noting the lack of rational relationship between the amount of that surcharge and the extent of the individual defendants use of court facilities. Instead, the amount of the surcharge is related to the seriousness of the defendants offense, and thus the court concluded that the surcharge is intended to punish the defendant. Given that conclusion, imposition of that surcharge on a defendant whose crimes occurred before its enactment violates the ex post facto clause.