improved the PR #5