update according to the comments in pull request