big rejiggering of boundary error treatment