minor changes to boundary, affine transform