deletion of unnecessary lines