trying to fix tangent computations