minor refactor
Merge pull request #3051 from dimagi/minor

minor refactor