Completed exercise 3.2, 3.3