Fixed exercise 5.6, sort of...