made small changes to content of exercise as well as solution, finalised