now take a map for renaming
seems to be working