use utility function
Merge pull request #799 from dimagi/cz

use utility function