some refactor changes