Works on a contrived example. Need to test on the full-blown one.