upgrade setNameController, remove some code