cleaned up some qr logic