switching between ad and sv
.
fixed bug