small improvement to setrn