Solution to #37.