An attempt at the in-class exercise.