finding the equation of a straight line