added rename feature, same refactor.