updates on excercise 40 and adding a few more comments on excercise 39