more efficient checking for renaming code