changed addLine() and removeLine() in model