final commit for exercise 3. Uploaded solution.