adds affine (modified copy of caeser)