refactored renameRemote