The finished exercise from Alan Shum