updated based on pull request review