BELGRADE, Serbia (AP) — Novak Djokovic put his career back on track this year, and he credits a mind-cleansing hiking trip with his wife after the French Open with the extraordinary turnaround.

The Serbian tennis great went from winning all four Grand Slam tournaments in a row in 2015-16 to a two-year drought of major titles while bothered by an elbow injury. That all changed at Wimbledon in July, when the 31-year-old Djokovic won his fourth title at the All England Club. He followed that with a third US Open, bringing his total to 14 majors.

"After the trip in nature, everything came together," Djokovic said Monday after a training session in Belgrade. "The finals in Queens, the titles at Wimbledon, Cincinnati and the US Open. ... In May, who would have thought I would be in this position."

Following those big wins, Djokovic has taken some time to rest. He even pulled out of this week's tournament in Beijing to recuperate further.

"The US Open was physically and mentally one of the most demanding Grand Slams for me," Djokovic said. "When you win a Slam, it's like climbing Mount Everest. You need a pause to recharge your batteries."

However, Djokovic said he was planning to play in Shanghai next week, with the goal of possibly overtaking Rafael Nadal at the top-ranked player by the end of the year. To do that, he may end up playing in Basel, Switzerland, and Vienna, Austria, before the Paris Masters.

"I have to see whether I'll get a wild card from the organizers," Djokovic said. "But first, I want to play my best in Shanghai, and then we'll see."