some refactor structure