Now works on small examples, untested on large examples