update after comments from jacknagel in pull request