That's one way to win a Masters 1000 match.

After dropping out of the Top 100, Canadian Vasek Pospisil had to get through the qualifying event in Shanghai. He's made the very best of it, getting into the main draw before besting Ivo Karlovic, 7-6 (5), 6-4 and then Grigor Dimitrov, 7-5, 7-6 (2) on Wednesday.

The 26-year-old is no stranger to success, reaching a career-high of No. 25 in 2014 and enjoying a quarterfinal showing at Wimbledon last year. But he failed to defend the points in 2016, and parted ways with his coach of almost four years, Frederic Fontag, as his ranking slipped to No. 131.

"It's been a tough year. Quite a few things were going on," Pospisil said. "But I feel really happy to be back. I feel like my old self on the court again. My head's in the game and I'm playing well."

Before Shanghai, Pospisil had managed to win back-to-back matches on just one occasion all year (and it was in qualifying). Next he'll get to test his newfound confidence against world No. 1 Novak Djokovic.