remove AD code