Second excercise in Assignment 1