Added exercise 5 and extended version