added option to rename used keys instead of deletion