code style refactor