Reese and Finch are going to be scrambling to save what’s left of The Machine when “Person of Interest” Season 5 premieres on Tuesday. The computer that’s been a crucial part of the series was driven to the brink of death at the end Season 4. Before you see the beginning of the final season of the CBS drama, here's what happened in the Season 4 finale, “YHWH.”

Samaritan was able to track down the location of The Machine and they started to execute blackouts across the country, into New York City. Because of the outages, The Machine started to struggle due to lack of power and it allowed Root (Amy Acker) and Reese (Jim Caviezel) access to its God Mode.

Dominic (Winston Duke) tried to force Reese and Finch (Michael Emerson) to help him, but The Machine allowed Reese to escape Dominic’s custody. After this Dominic looked to get away, but Fusco (Kevin Chapman) arrested him and Elias (Enrico Colantoni). Control (Camryn Manheim) looked to get more information about “The Correction” and she was lead to believe that Greer (John Nolan) could be going through with a terrorist attack on the Supreme Court.

However, Greer eventually revealed that “The Correction” is a list of names of people who need to be taken out for “the betterment of society.” After this information came out, Dominic, Elias and Agent Grice (Nick E. Tarabay) were taken out by Samaritan snipers. Fusco survived, but Control was taken into Samaritan custody.

Root and Finch worked on gathering information from The Machine and got some help from Caleb Phipps (Luke Kleintank), who provided with RAM chips and an algorithm that would help compress The Machine’s information. Finch and Root work to get the core code of The Machine downloaded to a briefcase that has the chips and algorithm. When Samaritan agents show up at the substation where the team is, Reese takes care of all them thanks to The Machine.

By the end of the episode, The Machine suffered extensive damage by the power surge and was close to being destroyed. Finch had a moment with The Machine and he assured it that he won’t let it die. A final outage rolled into their substation and Finch was able to rescue the briefcase before it was too late. The finale concluded with the team leaving and getting ready to face more Samaritan agents.

“Person of Interest” Season 5 premieres Tuesday, May 3, on CBS at 10 p.m. EDT.