improve modularity of transforms when generating qr codes