revise codes for qsdr