answer to question 3 of the first assignement