On December 26 the Rockets defeated the Memphis Grizzlies in Houston. This was noteworthy because the Rockets “found a way to win,” despite really bad shooting performances from their best players. Dwight Howard was only 1-for-5 from the field and ended up with two points. Jeremy Lin was 5-for-13, and Chandler Parsons was 5-for-12. Aside from Terrence Jones, nobody was getting shots to fall, especially the team’s leading scorer, James Harden, who was just 2-for-9.

But the Rockets still won, and Harden somehow still led all scorers with 27 points. How do you turn two made shots into 27 total points? You make 22 free throws.

James Harden is one of the smartest on-court players in the NBA. Perhaps more than anyone else, he understands the rules of the game and has engineered an approach to scoring that takes full advantage of these rules. It may not always be pretty (although sometimes it is), but it is almost always productive. Between his Eurostep and his incredible ability to get fouled, Harden might be a referee’s nightmare, but he’s also one of the best scorers in the league.

Although many NBA fans are loath to admit it, drawing a foul, particularly a shooting foul, is a very efficient basketball play. Fouls not only threaten to disqualify opponents, they also beget points at very high rates. The Portland Trail Blazers have the most efficient scoring offense in the NBA, scoring 1.11 points per possession. That’s a really high number, but it pales in comparison to the value of an average shooting foul, especially a James Harden shooting foul.

By shooting over 80 percent from the line, when Harden earns a two-shot foul, he effectively creates a possession worth 1.6 points. This, to the chagrin of some, is one of the NBA’s ugly truths: that an offensive possession that ends in a shooting foul is one of the best outcomes an offense could hope for. FAN-tastic.

As a result, it’s no surprise that free throws are central to Houston’s numbers-obsessed offensive offensive schemes. So far this season, the Rockets are averaging 32 free throw attempts per game, which is easily tops in the league. Part of this is because they have the human foul target, Dwight Howard, on their team, but it’s also down to Harden, who actually has drawn more shooting fouls than Howard this season.

According to data collected by the league, James Harden ranks fourth in shooting fouls drawn, while Howard is fifth. However, Harden is the only guard in the top five, which speaks to his unusual knack of getting to the line. Most shooting fouls in the NBA occur close to the rim, which is not unexpected, but a deeper look shows just how stark this effect is:

It makes sense that guys like Howard, DeMarcus Cousins, and Blake Griffin are among the leaders in shooting fouls drawn; they are each among the most active shooters close to the basket, and 57 percent of all shooting fouls occur in the tiny little space immediately in front of the hoop. But, as a guard, Harden is far less active close to the hoop, and he has attempted fewer than half the amount of close-range shots as Cousins.

Despite attempting only 223 shots within eight feet of the hoop this season, Harden has drawn 84 shooting fouls in that zone. In other words, Harden draws 38 shooting fouls per 100 shot attempts close to the basket. The NBA average is 22. Harden has the highest such ratio in the league close to the basket. The only other player who’s close is Kevin Durant, the best scorer on planet Earth, who has drawn 37 shooting fouls per 100 close-range attempts.

Perhaps more impressive is Harden’s ability to create free throws in areas slightly farther away from the rim. Harden’s Eurostep is one of the most devastating moves in the league. It enables him to legally (almost) run with the ball and find very creative paths to the rim. It also elongates his attacking actions, translating to a longer “act of shooting.” As a result, Harden’s brilliantly choreographed attacks often begin 10 feet or more from the rim, and when you look at where his shooting fouls occur, you can easily envision his attacking pathways, particularly on his dominant left side.

Many of those dots occur near the beginning of his attacks, allowing him to absorb contact early in the act, regroup, and still put up a decent shot. Like Dwyane Wade in his spinny, foul-drawing prime, Harden views the free throw line less as a “charity stripe” and more as an “opportunity stripe.” It might not be the most aesthetically appealing style of play, but it’s a smart approach for an aggressive, scoring-minded guard.

As of Monday, Harden was the only guard in the league to have drawn more than 200 total fouls. He comfortably leads all guards in free throw attempts; he’s averaging a whopping 8.9 free throw attempts per game, a full 2.3 tries above the second-highest guards, DeMar DeRozan and Ty Lawson.

Harden is like a really good tax preparer — he knows exactly what the loopholes are. He hones techniques that work the system to his advantage. That’s highly intelligent play, and as a result, he’s a perfect fit in Houston. After all, some have argued this is a team more interested in “solving” basketball than it is in playing basketball.