[feature] some refactoring