A Texas lawyer has been sentenced to six months in jail for misappropriating nearly $700,000 in funds he was supposed to be holding in trust on behalf of 138 children.

As part of a plea agreement with prosecutors, Austin attorney John Williams “Will” Coates agreed to give up his law license, pay back his victims and serve 10 years of probation after his release from jail, KXAN.com reports.

Coates spent more than a decade serving as a guardian ad litem in Travis and Williamson counties, appointed by the courts to represent the interests of children in legal proceedings. In that capacity, he was entrusted with $670,450 that had been awarded to the children, which was supposed to be put in a trust registered with the county clerk until the children turned 18.

But police say Coates didn’t deposit the money into the county registry. He co-mingled it with his own money and used some of it for his personal expenses. He also endorsed several checks to himself, forging the signature of the Travis County clerk.