Naive, slow solution to #114. Need to work on this for #115.