improved quality codes mapping