Corrected exercise after tips from @thlorenz
Exercise 5 --> with some cheating :/