factor out some duplicated code
Merge branch 'master' of https://github.com/nerdbeers/nerdbeers