Algorithm Fixed.
Fixed algorithm to 3 line for blending