QSV: simplify
QSV: better correctness