The function takes as input one start point and one end point not a vector of inputs