Finish exercise 3.1 & 3.2