Updated distortion to use tangent function