do code refactor.