upgraded version for renaming