adst working (with small kludge)