Fix the homework exercise 4