Includes logic and decision-making up to exercise 31