recoding and removing outdated codes