refactor some code style