some refactor and data script