delete all unnecessary lines