Exersice 2: part2: Q4 + Q5 (Q5 last section might be wrong)