added insertion of line's end x position