Solution to #29