Solved exercise 5, improved markdown formatting