Prerequisites for problem 3