DMX is headed to rehab.

The New York rapper has been taken off house arrest in his ongoing tax evasion case on the condition that he enter a drug treatment program, according to TMZ.

As part of this deal, X will be able to leave his home without wearing an ankle monitor, though he is still unable to travel outside of New York state without permission.

Attorney Murray Richman says that the treatment program is meant to help his client deal with an “impossible to manage” drug problem.

X has already requested permission to travel for concerts, but it is unclear whether the new treatment program will conflict with any of those dates.

DMX failed four drug tests and was sentenced to house arrest earlier this month, after a judge found that he violated the terms of his bail agreement.

The legendary rapper is currently being investigated for tax fraud after allegedly “engaging in a multi-year scheme to conceal” $1.7 million in taxes from the Internal Revenue Service. If he is found guilty on all charges, he could face more than 40 years behind bars.