clone from zxing google code