to restore simple codes