add method to update one or both points in a line