Google has come under scrutiny in the European Union even as another American tech giant, Apple, is embroiled in an issue about avoiding paying taxes in the region.

Google saved $3.6 billion just in 2015 using a system of loopholes called "Double Irish" and "Dutch Sandwich," Bloomberg reported Thursday. The loopholes let large and profitable companies such as Google to shuffle profits through subsidiaries in the Netherlands and Ireland and from there to tax havens such as Bermuda and Cayman Islands.

So how does it work? Well, Google does not bring international profits back to the U.S., where it would be taxed on them. Rather, moves the non-U.S. profits to low-tax countries such as Ireland and the Netherlands. So the money is transferred to Google Ireland Limited, which transfers it to the company’s Netherlands account. Then the money is transferred to a Bermuda-based company, with no employees, called Google Ireland Holdings Limited, which holds the company’s intellectual property right guaranteeing it profits and thus completing the "Double Irish" and "Dutch Sandwich" loophole.

Bloomberg cites Google parent company Alphabet’s SEC filing and estimates that the company might have saved as much as $58.3 billion from U.S. taxation.