Part 2 logic.