Added qualityValue and test.