Factored out a function.
Factored out a function.

jgm/lunamark,simoncozens/lunamark,tst2005/lunamark,jgm/lunamark,tst2005/lunamark,jgm/lunamark,simoncozens/lunamark,tst2005/lunamark,simoncozens/lunamark