some refactor, add rename