implementing pull request #2