A federal appeals court in Washington, D.C., on Friday struck down a 30-year ban on any computer use by a convicted sex offender, sending the case back to the trial court to refine the restriction in a way that opens it up to modification for work purposes.

The defendant, Mark Russell, had pleaded guilty in federal district court to one count of traveling to engage in unlawful sexual conduct. He was sentenced to 46 months in prison and 30 years of supervised release. During his release, Russell is forbidden from possessing or using a computer for any reason.