added affine gap model at runtime