Justice William Stein thought about retiring four years ago but decided to stick around because of a program that’ll leave him with a fatter wallet when he finally hangs up the robe.

The 67-year-old will be taking advantage of a California program — now in its eighth year — that provides bench veterans a healthy financial incentive to stay awhile longer. As a result, when Stein leaves San Francisco’s 1st District Court of Appeal at the end of August, he’ll take with him about an extra $160,000 in retirement funds.