small refactor
Merge pull request #871 from dimagi/cz

small refactor