added an else statement to my delete line function