Added delete last line method