
492 So.2d 784 (1986)
Jerry WILLIAMS, Appellant,
v.
STATE of Florida, Appellee.
No. 85-1766.
District Court of Appeal of Florida, Fifth District.
August 7, 1986.
*785 James B. Gibson, Public Defender, and Michael L. O'Neill, Asst. Public Defender, Daytona Beach, for appellant.
No appearance for appellee.
COBB, Judge.
Williams, an indigent, pled guilty to violation of probation and was sentenced to one year of community control. Williams subsequently violated community control and was sentenced to four years in prison, with a cost assessment of $248 under sections 960.20, 943.25(4) and 27.3455, Florida Statutes (1985). This represented a threecell departure from the presumptive guideline sentence. The trial court did not give any written reasons for the departure.
On appeal, Williams contends that the trial court erred in failing to provide written reasons for the departure and in imposing costs without providing him notice and an opportunity to object due to his indigent status. Williams is correct on both counts. See State v. Jackson, 478 So.2d 1054 (Fla. 1985); Jenkins v. State, 444 So.2d 947 (Fla. 1984); Boldes v. State, 475 So.2d 1356 (Fla. 5th DCA 1985). Thus, this case is remanded for the trial court to submit valid written reasons for departure should it wish to depart from the guidelines sentence,[1] and for the state to be given an opportunity to comply with the procedure outlined in Jenkins, supra.[2]
REVERSED and REMANDED.
UPCHURCH, C.J., and ORFINGER, J., concur.
NOTES
[1]  A second violation of a nonstate prison sanction is a valid basis for departure. See Riggins v. State, 477 So.2d 663 (Fla. 5th DCA 1985).
[2]  Additionally, although the appellant has not raised this point on appeal, it should be noted on remand that the imposition of costs under section 27.3455 in the present case violates the ex post facto doctrine, since the commission of Williams' initial offense occurred prior to the effective date of the statute. See Yost v. State, 489 So.2d 131 (Fla. 5th DCA 1986).
