Solved QA_2 exercise 2