Second version of my exercise.