added renameKeys function