Assignment 1, exercise 2