remove duplicated code
Merge pull request #1766 from dimagi/oh-dan

remove duplicated code