Assignment 6. Exercise 1 and 2