Updated method per comments in the pull request.