some refactor and better readability
some refactor and better readability