some refactor