some DSTR optimizations