Solution to #34.