works on all of Irving's examples