updates based on pull request 362