a bunch of cross-compatibility code for DST