major code fix based on lab QR experience