QRCode algorithm