Changes end points of lines