Four hours before Friday night's game was scheduled to begin, Andrew McCutchen went out to the field at Citizens Bank Park and hit curveballs off a pitching machine that was designed to throw super-slow breaking balls. The idea: Slow down a swing that had gotten out of whack over the last few weeks.

Practice, it turns out, sometimes does make you almost perfect.

McCutchen delivered a two-run home run — his first blast since April 28 to help jumpstart the Phillies offense en route to a 5-4 victory over the Rockies. McCutchen also drew two more walks and threw a runner out at the plate from left field, as the Phillies snapped a three-game losing streak.

"It's really gratifying to see a guy go out pregame, work on something specific, and immediately apply it," manager Gabe Kapler said. "Andrew McCutchen was incredibly comfortable at the plate today. Very relaxed. Very easy. In control of all of his plate appearances, including the one where he struck out. I'll let you guys complete that."

Translation: McCutchen couldn't do anything about home-plate umpire Angel Hernandez's strike zone. At last, though, in the midst of a slump that has been overshadowed by Bryce Harper's month-long funk, it was about the only thing that McCutchen couldn't control.

Harper finally got a big hit, too. Matter of fact, his two-run double after McCutchen walked and Jean Segura notched one of his three hits with two out in the fifth inning held up as the decisive blow for the Phillies, who didn't get many big hits this week in losing three games in a row to the Brewers.

And while the silver lining in the dual struggles of McCutchen and Harper is that both outfielders have still been drawing walks and reaching base at a decent clip, the biggest walk Friday night was the 10-pitch free pass worked by rookie pitcher Cole Irvin in his first big-league plate appearance. Irvin outlasted Rockies pitcher Jon Gray in the third inning, reaching base with two outs before McCutchen went deep to bring the Phillies back from a two-run deficit.

"Huge at-bat," Harper said. "He threw the ball well, of course, but really sparked us with that huge at-bat that he had."

Irvin, who committed two errors in a rough second inning that could have been far worse, fouled off three pitches in a row and four out of five before laying off a 97 mph fastball to draw the walk. McCutchen followed by getting to a full count before slugging a 97 mph heater over the left-field wall.

"I feel like I've been muscling up quite a bit to the ball as opposed to just letting the ball come to me," McCutchen said. "That's what I did. That's why I hit some real slow curveballs on the field. The only way you can hit those good is if you slow down, and that's what I did."

Irvin’s second big-league start was as much a curiosity as his first. Five days earlier in Kansas City, he shut down a Royals lineup that ranks as one of the worst in the American League in a ballpark that isn’t conducive to offense. The Rockies — and homer-friendly Citizens Bank Park -- surely would present stiffer tests.

And Irvin did struggle at times, particularly during a second inning in which he made two throwing errors that led to a run. He benefited from McCutchen's throw in the third inning. The 79th of Irvin's 84 pitches got hit for a two-run homer by Ian Desmond, cutting back the Phillies' lead to 5-4.

But Irvin also got through six innings with a lead, which, ultimately, is what the Phillies ask of their starting pitchers.

“A little disappointed in that second inning, as well as that home run — a slider I left up,” Irvin said. “I need to get better for the next start. That second inning is completely on me. I’ll take some extra reps this week and get ready for the next start and see what happens.”

Hey, it worked for McCutchen.