delivered the opinion of the court:
In 1980, Roy Fox was charged with rape, deviate sexual assault and armed violence. Pretrial bond was set at $10,000 and, pursuant to the “Deposit of bail security” statute (Ill. Rev. Stat. 1979, ch. 38, par. 110—7), Fox posted 10% of the bond ($1,000) to secure his release. After trial in the circuit court of Cook County, Fox was convicted of rape and deviate sexual assault. The trial court then revoked Fox’ bond, and the clerk of the court, pursuant to the statute, returned to Fox $900 (90% of the amount posted) retaining $100 (10% of the amount posted), for bond costs.
The trial court thereupon set an appeal bond in the amount of $500,000. On Fox’ motion, the appellate court reduced the appeal bond to $100,000. After six months in jail, Fox posted a bond deposit in the amount of $10,000 and was released from custody.
In March 1983, the appellate court reversed Fox’ convictions outright (No. 82—522). Fox then filed in the circuit court a motion requesting that the court order the clerk to return to Fox the entire $10,000 he had posted as an appeal bond, save for $5. The State objected, contending that pursuant to the terms of the bail security statute, Fox was entitled to a return of only 90% of the amount he posted. The trial court, indicating its interpretation of the statute to provide for return of only 90% of the amount posted, denied Fox’ motion, and ordered the clerk to return $9,000 to Fox. Fox appeals.
The current “Deposit of bail security” statute provides, in part:
“(f) When the conditions of the bail bond have been performed and the accused has been discharged from all obligations in the cause, the clerk of the court shall return to the accused, unless the court orders otherwise, 90% of the sum which had been deposited and shall retain as bond costs 10% of the amount deposited. However, in no event shall the amount retained by the clerk as bail bond costs be less than $5.
At the request of the defendant the court may order such 90% of the defendant’s bail deposit, or whatever amount repayable to defendant from such deposit, to be paid to defendant’s attorney of record.” Ill. Rev. Stat. 1981, ch. 38, par. 110—7.
Both parties here apparently agree that the statutory language in the current statute “unless the court orders otherwise” vests the court with discretion to order the clerk of the court to return more than 90% of the bail deposit. We agree. As originally enacted in 1963, this statute provided that the clerk of the court “shall return to the accused 90% of the sum which had been deposited and shall retain as bail bond costs 10% of the amount deposited.” (Emphasis added.) In interpreting and construing statutes, the threshold task of the court is to examine the terms of the statute itself. (People ex rel. Gibson v. Cannon (1976), 65 Ill. 2d 366, 357 N.E.2d 1180.) Where the language of the statute is certain and unambiguous, the only legitimate function of the courts is to enforce the law as enacted by the legislature. (Certain Taxpayers v. Sheahen (1970), 45 Ill. 2d 75, 256 N.E.2d 758.) We perceive no ambiguity in the statute here in issue; we believe it grants a trial court the discretionary authority to return more than 90% of a bail deposit under appropriate circumstances.
Fox invites this court to consider directly the merits of his motion for the return of his bond deposit, and to order the clerk of the court to return to him his entire bond deposit (minus the $5 the statute requires the clerk to retain). This we decline to do, since it is the province of the appellate court solely to review the trial court’s adjudication.
In the instant case, the record indicates that the trial court believed it had no discretion to entertain Fox’ request for return of more than 90% of the bail deposit. It has been held that the failure of a trial court to exercise its discretion permits remandment to allow the court to so act. See, e.g., People v. Greene (1982), 102 Ill. App. 3d 639, 430 N.E.2d 219; People v. Talley (1981), 97 Ill. App. 3d 439, 422 N.E.2d 1084.
We hold, therefore, that this case should be reversed and remanded to enable the trial court to exercise its statutory discretion with respect to Fox’ motion. We observe that pursuant to the opinion in People v. Lange (1984), 102 Ill. 2d 225, 464 N.E.2d 1071, when, as here, an accused has posted more than one bond deposit, the clerk is empowered to retain an amount for bail bond costs from the “amount deposited at the time the case was concluded.” Thus, here, it would appear that under any circumstances, Fox is entitled to a return of the full amount he posted for pretrial bond; any bond costs retained by the court clerk must be solely based on the second (appeal) bond posted by Fox.
Reversed and remanded with directions.
HARTMAN and BILANDIC, JJ., concur.