Solves Part 4