remove unwritten sections