put in a different method for finding the slope of tangent lines