Bonus coursework C based on Tomas Petricek's examples.