untested addition for STEX mode (adds to #8)